package com.wu.client.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum AlbumGenreEnum {
    POP("流行", 1), ROCK("摇滚", 2), FOLK("民谣", 3),
    ELECTRONIC("电子", 4), HIP_HOP("嘻哈", 5), R_B("R&B", 6),
    JAZZ("爵士", 7), CLASSICAL("古典", 8), EASY_LISTENING("轻音乐", 9), SOUNTRACK("原声", 10),
    COUNTRY("乡村", 11), BLUES("蓝调", 12), METAL("金属", 13),
    PUNK("朋克", 14), WORLD_MUSIC("世界音乐", 15);

    private final String genre;
    private final Integer code;
   public static String getGenreByCode(Integer code) {
    for (AlbumGenreEnum albumGenreEnum : AlbumGenreEnum.values()) {
        if (albumGenreEnum.getCode().equals(code)) {
            return albumGenreEnum.getGenre();
        }
    }
    // 返回默认值
    return "未知分格";
}

}
